package com.iotechn.unimall.admin.api.inspection;

import com.dobbinsoft.fw.core.Const;
import com.dobbinsoft.fw.core.annotation.HttpMethod;
import com.dobbinsoft.fw.core.annotation.HttpOpenApi;
import com.dobbinsoft.fw.core.annotation.HttpParam;
import com.dobbinsoft.fw.core.annotation.HttpParamType;
import com.dobbinsoft.fw.core.annotation.param.NotNull;
import com.dobbinsoft.fw.core.exception.ServiceException;
import com.dobbinsoft.fw.support.model.Page;
import com.iotechn.unimall.data.domain.InspectionRoundsDO;

import java.util.Date;
import java.util.List;

/**
 * Generate Code By Unimall
 */
@HttpOpenApi(group = "admin.inspectionrounds", description = "unimall_inspection_roundsService")
public interface inspectionRoundsService {

    @HttpMethod(description = "巡检记录轮数", permission = "PatrolRecord:inspectionrounds:appRecordRounds", permissionParentName = "其他", permissionName = "inspectionRounds")
    public List<InspectionRoundsDO> appRecordRounds(
            @HttpParam(name = "date", type = HttpParamType.COMMON, description = "时间") String date,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;


    @HttpMethod(description = "删除", permission = "PatrolRecord:inspectionrounds:delete", permissionParentName = "其他", permissionName = "inspectionRounds")
    public boolean delete(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "id") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "查询", permission = "PatrolRecord:inspectionrounds:list", permissionParentName = "其他", permissionName = "inspectionRounds")
    public Page<InspectionRoundsDO> list(
            @HttpParam(name = "inspectionStart", type = HttpParamType.COMMON, description = "巡检开始时间") Date inspectionStart,
            @HttpParam(name = "page", type = HttpParamType.COMMON, description = "页码", valueDef = "1") Integer page,
            @HttpParam(name = "limit", type = HttpParamType.COMMON, description = "页码长度", valueDef = "20") Integer limit,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "添加", permission = "PatrolRecord:inspectionrounds:create", permissionParentName = "其他", permissionName = "inspectionRounds")
    public InspectionRoundsDO create(
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

    @HttpMethod(description = "编辑", permission = "PatrolRecord:inspectionrounds:edit", permissionParentName = "其他", permissionName = "inspectionRounds")
    public String edit(
            @NotNull @HttpParam(name = "id", type = HttpParamType.COMMON, description = "主键") Long id,
            @NotNull @HttpParam(name = "adminId", type = HttpParamType.ADMIN_ID, description = "管理员ID") Long adminId) throws ServiceException;

}
